package searchcode;

public class BaseSearch {
    public static void main(String[] args) {
        int[] arr = {2, 3, 5, 12, 22, 34, 35, 67};
        int index = baseSearch(arr,121);
        System.out.println(index);
    }

    public static int baseSearch(int[] arr, int target) {
        for (int i = 0; i < arr.length; i++) {
            if(arr[i]==target){
                return i;
            }
        }
        return -1;
    }
}
